HTML DOM Input TimeObject

# HTML DOM Input Time Object

« Previous
Next Reference »

## Input Time Object

The Input Time Object is new in HTML5.

The Input Time object represents an HTML <input> element with type="time".

Note: <input> elements with type="time" are not supported in Internet Explorer or Firefox.

### Access an Input Time Object

You can access an <input> element with type="time" by using getElementById():

var x = document.getElementById("myTime"); Try it

Tip: You can also access <input type="time"> by searching through the elements collection of a form.

### Create an Input Time Object

You can create an <input> element with type="time" by using the document.createElement() method:

var x = document.createElement("INPUT");
x.setAttribute("type", "time"); Try it

## Input Time Object Properties

Property | Description
--- | ---
autocomplete | Sets or returns the value of the autocomplete attribute of a time field
autofocus | Sets or returns whether a time field should automatically get focus when the page loads
defaultValue | Sets or returns the default value of a time field
disabled | Sets or returns whether a time field is disabled, or not
form | Returns a reference to the form that contains the time field
list | Returns a reference to the datalist that contains the time field
max | Sets or returns the value of the max attribute of the time field
min | Sets or returns the value of the min attribute of the time field
name | Sets or returns the value of the name attribute of a time field
readOnly | Sets or returns whether the time field is read-only, or not
required | Sets or returns whether the time field must be filled out before submitting a form
step | Sets or returns the value of the step attribute of the time field
type | Returns which type of form element the time field is
value | Sets or returns the value of the value attribute of a time field

## Input Time Object Methods

Method | Description
--- | ---
stepDown() | Decrements the value of the time field by a specified number
stepUp() | Increments the value of the time field by a specified number

## Standard Properties and Events

The Input Time object also supports the standard properties and events.

## Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <input> tag

HTML reference: HTML <input> type attribute

« Previous
Next Reference »

### WEB HOSTING

UK Reseller Hosting

### WEB BUILDING

FREE Website BUILDER Free HTML5 Templates

### W3SCHOOLS EXAMS

HTML, CSS, JavaScript, PHP, jQuery, XML, and ASP Certifications

### SHARE THIS PAGE

### Color Picker

### HTML/CSS

HTML Tutorial HTML5 Tutorial CSS Tutorial CSS3 Tutorial Bootstrap Tutorial

### JavaScript

JavaScript Tutorial jQuery Tutorial jQuery Mobile Tutorial AngularJS Tutorial AJAX Tutorial JSON Tutorial

### Graphics

Canvas Tutorial SVG Tutorial Google Maps Tutorial

### Server Side

SQL Tutorial PHP Tutorial ASP Tutorial ASP.NET Tutorial VBScript Tutorial AppML Tutorial

### Web

Web Building Web Statistics Web Certification

### XML

XML Tutorial DTD Tutorial Schema Tutorial XML DOM Tutorial XPath Tutorial XSLT Tutorial XQuery Tutorial XSL-FO Tutorial RSS Tutorial WSDL Tutorial

### HTML/CSS

HTML Tag Reference HTML Event Reference HTML Color Reference CSS 1,2,3 Reference Bootstrap Reference

### JavaScript

JavaScript Reference HTML DOM Reference jQuery Reference jQuery Mobile Reference Google Maps Reference

### Server Side

PHP Reference SQL Reference ASP Reference VBScript Reference Razor Reference ASP.NET Reference

### XML

XML DOM Reference XSLT Reference XSL-FO Reference XPath Reference XQuery Reference Schema Reference RSS Reference SVG Reference

### HTML Charsets

HTML Character Sets HTML ASCII HTML ANSI HTML Windows-1252 HTML ISO-8859-1 HTML Symbols HTML UTF-8

### HTML/CSS

HTML Examples CSS Examples

### Browser Scripting

JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS Examples AJAX Examples

### Server Scripting

PHP Examples ASP Examples VBScript Examples Razor Examples .NET Examples

### XML Languages

XML Examples DTD Examples XML DOM Examples XSL Examples XSLT Examples XPath Examples XQuery Examples Schema Examples RSS Examples SVG Examples